<?php
function query($sql)
{
 $connection= mysql_connect('localhost','root' ,'vertrigo')or die('Cannot connect to Server');
 mysql_select_db('tdc_database')or die('Cannot connect to Server');
 $ketqua= mysql_query($sql);
 $data=array();
 while($row=  mysql_fetch_assoc($ketqua))
 {
     $data[]=$row;
 }
 return $data;
}